package com.tdogg.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.tdogg.entity.Funs;
import com.tdogg.entity.Role;

@Repository
public interface RoleMapper {
	Role findById(Integer id);
	List<Role> findAllRole();
	int addRole(Role role);

	int updateRole(Role role);

	void addRolePermisson(@Param("roleId") Integer roleId , @Param("fun") Integer fun);

	List<Role> queryAllRoleByKeywords(@Param("keywords") String keywords);

	Role selectRoleByName(@Param("roleName") String roleName);

	Role selectNotMeRoleName(@Param("roleName") String roleName,@Param("roleId") Integer roleId);

	void deleteRolePermission(@Param("roleId") Integer roleId);

	void deleteRole(@Param("roleId") Integer roleId);
}
